package com.xspace.android.imcommon.utils;

import java.io.File;

public class ImConstants {
	public static final String ACCOUNT_BAREJID_KEY = "barejid";
	public static final String ACCOUNT_id_KEY = "id";
	public static final String ACCOUNT_MOBILE_KEY = "mobile";
	public static final String ACCOUNT_PASSWORD_KEY = "password";
	public static final String ACCOUNT_RESOURCE_KEY = "android";

	// --------------------socket 接口-------------------------------
//	public static final String IP= "http://12316yun.com";
//	public static String URL_SUFFIX = "http://12316yun.com";// 现网地址
	public static  String URL_SUFFIX= "http://222.173.29.164:81";// 内网地址
	public static final String IP= "http://222.173.29.164:81";
	public static final String suffix= "AFMIS";
	private static final String VERSION_SUFFIX = "?v=3";
	public static final String suffix_temp= IP+File.separator+suffix+File.separator;
	public static final String suffix_middle= File.separator+suffix+File.separator;
	/** 手机客户端查找好友群体 */
	public static String getFriendUrl() {
		String url=URL_SUFFIX;
		if(!url.contains(suffix)){
			url=url+suffix_middle;
		}
		return url+ "findFriends"+VERSION_SUFFIX;
	}

	public static String getUploadUrl() {
		return URL_SUFFIX+suffix_middle+"upLoad" +VERSION_SUFFIX;
	}

	public static String getSearChUrl() {
		String url=URL_SUFFIX;
		if(url!=null&&!url.contains(suffix)){
			url=url+suffix_middle;
		}
		return url + "searchUser"+VERSION_SUFFIX;
	}

	/** 机器人 */
	public static String getRobottalkUrl() {//"/WeiXinIS/robotTalkMsgAction"
		String url=URL_SUFFIX;
		if(!url.contains(suffix)){
			url=url+"/WeiXinIS/";
		}
		return url + "robotTalkMsgAction"+VERSION_SUFFIX;
	}

	public static final String robotMobile = "00000000000";
	public static final String robotJid = "00000000000";
	public static final String robotName = "聊吧小知了";

	public interface MessageType {
		public static final int NONE = -1;
		public static final int TEXT = 0;
		public static final int PICTURE = 1;
		public static final int VOICE = 2;
		public static final int TEXTIMG= 3;
	}

	public interface MessageState {
		public static final int SEND_ING = 0;// 发送中
		public static final int SEND_SUC = 1;// 发送成功
		public static final int SEND_FAIL = 2;// 发送失败
		public static final int UNREAD = 3;// 接收
	}

	public static String MessageType(int type) {
		switch (type) {
		case MessageType.TEXT:
			return "text";
		case MessageType.PICTURE:
			return "image";
		case MessageType.VOICE:
			return "voice";
		case MessageType.TEXTIMG:
			return "3";
		}
		return "";

	}
}
